home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / lang_ext / vbawk / multiope.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-08-15  |  7.1 KB  |  242 lines

  1. VERSION 2.00
  2. Begin Form MultiOpen 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "VB-AWK: Select Files to Process"
  5.    ClientHeight    =   3300
  6.    ClientLeft      =   1365
  7.    ClientTop       =   2430
  8.    ClientWidth     =   7125
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    FontBold        =   0   'False
  12.    FontItalic      =   0   'False
  13.    FontName        =   "Fixedsys"
  14.    FontSize        =   9
  15.    FontStrikethru  =   0   'False
  16.    FontUnderline   =   0   'False
  17.    Height          =   3705
  18.    Left            =   1305
  19.    LinkTopic       =   "Form3"
  20.    MaxButton       =   0   'False
  21.    MinButton       =   0   'False
  22.    ScaleHeight     =   3300
  23.    ScaleWidth      =   7125
  24.    Top             =   2085
  25.    Width           =   7245
  26.    Begin Frame Frame2 
  27.       Caption         =   "Select Directory:    "
  28.       Height          =   3015
  29.       Left            =   240
  30.       TabIndex        =   7
  31.       Top             =   120
  32.       Width           =   3255
  33.       Begin CheckBox ExpandDirectories 
  34.          Caption         =   "Expand Directories"
  35.          Height          =   195
  36.          Left            =   600
  37.          TabIndex        =   12
  38.          Top             =   2700
  39.          Width           =   2175
  40.       End
  41.       Begin DriveListBox SrcDrive 
  42.          FontBold        =   0   'False
  43.          FontItalic      =   0   'False
  44.          FontName        =   "Fixedsys"
  45.          FontSize        =   9
  46.          FontStrikethru  =   0   'False
  47.          FontUnderline   =   0   'False
  48.          Height          =   345
  49.          Left            =   120
  50.          TabIndex        =   0
  51.          Top             =   360
  52.          Width           =   3015
  53.       End
  54.       Begin DirListBox Dir1 
  55.          FontBold        =   0   'False
  56.          FontItalic      =   0   'False
  57.          FontName        =   "Fixedsys"
  58.          FontSize        =   9
  59.          FontStrikethru  =   0   'False
  60.          FontUnderline   =   0   'False
  61.          Height          =   1815
  62.          Left            =   120
  63.          TabIndex        =   1
  64.          Top             =   840
  65.          Width           =   3015
  66.       End
  67.    End
  68.    Begin Frame Frame1 
  69.       Caption         =   "Select  Files: "
  70.       Height          =   2535
  71.       Left            =   3840
  72.       TabIndex        =   9
  73.       Top             =   120
  74.       Width           =   3135
  75.       Begin CommandButton NoneBtn 
  76.          Caption         =   "None"
  77.          Height          =   375
  78.          Left            =   2280
  79.          TabIndex        =   11
  80.          Top             =   1320
  81.          Width           =   615
  82.       End
  83.       Begin CommandButton InvertBtn 
  84.          Caption         =   "Invert"
  85.          Height          =   375
  86.          Left            =   2280
  87.          TabIndex        =   10
  88.          Top             =   1920
  89.          Width           =   615
  90.       End
  91.       Begin CommandButton AllBtn 
  92.          Caption         =   "All"
  93.          Height          =   375
  94.          Left            =   2280
  95.          TabIndex        =   4
  96.          Top             =   720
  97.          Width           =   615
  98.       End
  99.       Begin TextBox Pattern 
  100.          Height          =   285
  101.          Left            =   1560
  102.          TabIndex        =   2
  103.          Text            =   "*.*"
  104.          Top             =   360
  105.          Width           =   855
  106.       End
  107.       Begin FileListBox File1 
  108.          FontBold        =   0   'False
  109.          FontItalic      =   0   'False
  110.          FontName        =   "Fixedsys"
  111.          FontSize        =   9
  112.          FontStrikethru  =   0   'False
  113.          FontUnderline   =   0   'False
  114.          Height          =   1605
  115.          Hidden          =   -1  'True
  116.          Left            =   120
  117.          MultiSelect     =   2  'Extended
  118.          System          =   -1  'True
  119.          TabIndex        =   3
  120.          Top             =   720
  121.          Width           =   1935
  122.       End
  123.       Begin Label Label1 
  124.          Caption         =   "Pattern:"
  125.          FontBold        =   0   'False
  126.          FontItalic      =   0   'False
  127.          FontName        =   "Fixedsys"
  128.          FontSize        =   9
  129.          FontStrikethru  =   0   'False
  130.          FontUnderline   =   0   'False
  131.          Height          =   255
  132.          Index           =   1
  133.          Left            =   240
  134.          TabIndex        =   8
  135.          Top             =   360
  136.          Width           =   1095
  137.       End
  138.    End
  139.    Begin CommandButton Command2 
  140.       Caption         =   "Cancel"
  141.       FontBold        =   0   'False
  142.       FontItalic      =   0   'False
  143.       FontName        =   "Fixedsys"
  144.       FontSize        =   9
  145.       FontStrikethru  =   0   'False
  146.       FontUnderline   =   0   'False
  147.       Height          =   375
  148.       Left            =   5520
  149.       TabIndex        =   6
  150.       Top             =   2760
  151.       Width           =   1095
  152.    End
  153.    Begin CommandButton Command1 
  154.       Caption         =   "OK"
  155.       FontBold        =   0   'False
  156.       FontItalic      =   0   'False
  157.       FontName        =   "Fixedsys"
  158.       FontSize        =   9
  159.       FontStrikethru  =   0   'False
  160.       FontUnderline   =   0   'False
  161.       Height          =   375
  162.       Left            =   4200
  163.       TabIndex        =   5
  164.       Top             =   2760
  165.       Width           =   1095
  166.    End
  167. Sub AllBtn_Click ()
  168.     For i% = 0 To (File1.ListCount - 1)
  169.         File1.Selected(i%) = True
  170.     Next i%
  171. End Sub
  172. Sub Command1_Click ()
  173.     Hide
  174. End Sub
  175. Sub Command2_Click ()
  176.     End
  177. End Sub
  178. Sub Dir1_Change ()
  179.     File1.Path = Dir1.Path
  180.     File1.Refresh
  181. End Sub
  182. Sub DoSrcDriveChange (TheForm As Form)
  183.     On Error GoTo nogood
  184.     NewPath$ = Left$(TheForm.SrcDrive.Drive, 2)
  185.     TheForm.Dir1.Path = NewPath$
  186.     TheForm.Dir1.Refresh
  187.     Exit Sub
  188. nogood:
  189.     MsgBox "Can't access drive."
  190.     TheForm.SrcDrive.Drive = "C:"
  191.     Exit Sub
  192. End Sub
  193. Sub ExpandDirectories_Click ()
  194.     If ExpandDirectories.Value = 0 Then
  195.         'enable buttons and file list box
  196.         File1.Enabled = True
  197.         AllBtn.Enabled = True
  198.         NoneBtn.Enabled = True
  199.         InvertBtn.Enabled = True
  200.     Else
  201.         'disable buttons and file list box
  202.         NoneBtn_Click
  203.         File1.Enabled = False
  204.         AllBtn.Enabled = False
  205.         NoneBtn.Enabled = False
  206.         InvertBtn.Enabled = False
  207.     End If
  208. End Sub
  209. Sub File1_DblClick ()
  210.     Command1_Click
  211. End Sub
  212. Sub Form_Activate ()
  213.     File1.Refresh
  214. End Sub
  215. Sub Form_Load ()
  216.     Caption = APPNAME & Right$(Caption, Len(Caption) - 6)
  217. End Sub
  218. Sub InvertBtn_Click ()
  219.     For i% = 0 To (File1.ListCount - 1)
  220.         If File1.Selected(i%) Then
  221.             File1.Selected(i%) = False
  222.         Else
  223.             File1.Selected(i%) = True
  224.         End If
  225.     Next i%
  226. End Sub
  227. Sub NoneBtn_Click ()
  228.     For i% = 0 To (File1.ListCount - 1)
  229.         File1.Selected(i%) = False
  230.     Next i%
  231. End Sub
  232. Sub Pattern_Change ()
  233.     On Error Resume Next
  234.     File1.Pattern = Pattern.Text
  235. End Sub
  236. Sub SrcDrive_Change ()
  237.     DoSrcDriveChange Me
  238.     If File1.ListCount > 0 Then
  239.         File1.Selected(0) = True
  240.     End If
  241. End Sub
  242.